# -*- coding: utf-8 -*-
import sys
import re
import os
from shared import init
from app import main
from numba import jit


@jit
def f(x, y):
    # A somewhat trivial example
    return x + y


SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
SHARED_DIR = os.path.join(SCRIPT_DIR, 'shared')

if __name__ == '__main__':
    sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0])
    (app_env, app_debug) = init(SCRIPT_DIR)
    sys.exit(main(SCRIPT_DIR, app_env, app_debug))
